package seven.test_7_15;

import java.util.Scanner;

public class TestMain1 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String str = scanner.nextLine();
        int max = -1;
        int l = 0;
        int r = 0;
        int cur = 0;
        for (int i = 0; i < str.length(); i++) {
            char c = str.charAt(i);
            if(c >= '0' && c <= '9') {
                cur = i;
                while (i < str.length() && str.charAt(i) >= '0' && str.charAt(i) <= '9') {
                    i++;
                }
                if(i - cur > max) {
                    max = i - cur;
                    l = cur;
                    r = i;
                }
            }
        }
        for (int i = l; i < r; i++) {
            System.out.print(str.charAt(i));
        }
    }
}
